package com.cw.controller;

import com.cw.beans.Depreciate;
import com.cw.mapper.DepreciateMapper;
import com.cw.service.DepreciateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@Controller
public class DepreciateController {
    @Autowired
    private DepreciateMapper depreciateMapper;
    //ajax获取折旧率的下拉列表回显
    @ResponseBody
    @RequestMapping("/getDepreciate")
    public List<Depreciate> getDepreciate(){
        List<Depreciate> depreciateNameList = depreciateMapper.getDepreciate();
        System.out.println(depreciateNameList);
        return depreciateNameList;
    }
}
